<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            padding-bottom: 800px;
            padding-left: 30px;
        }
        .label1{
            vertical-align: middle;
            font-size: 30px;
            padding: 0px 10px;
        }
        .lable2{
            vertical-align: middle;
            font-size: 16px;
            padding: 0px 10px;
        }
        .cbox{
            border: 1px solid #999;
            padding: 20px;
            margin: 10px 0px;
        }
        .fc1{
            color: red;
        }
        .fc2{
            color: blue;
        }
    </style>
    <link rel="stylesheet" href="./components/switchBtn.css">
</head>
<body>
    <div id="app">
        <h4>组件标签上定义的 class 和 style 属性一般不用于拦截操作，而直接用于样式传递操作【组件只有一个根节点】</h4>
        <div>
            <span class="label1">按年付费</span>
            <switch-btn style="font-size:20px"></switch-btn>
            <span class="label1">按月付费</span>
        </div>
        <br>
        <div>
            <span class="lable2">按年付费</span>
            <switch-btn></switch-btn>
            <span class="lable2">按月付费</span>
        </div>
        <hr>
        <h4>组件标签上定义的 class 和 style 属性一般不用于拦截操作，子组件中通过v-bind="$attrs"用于样式传递操作【组件不止一个根节点】</h4>
        <comp-a class="fc1"></comp-a>
        <br>
        <comp-a class="fc2"></comp-a>
    </div>
    <script type="module">
        // 加载 Vue3 的ESM 模块文件
        import { createApp } from "../../assets/vue3/vue.esm-browser.js"
        import switchBtn from "./components/switchBtn.js";
        import CompA from "./components/CompA.js";

        createApp({
            components: { 
                switchBtn,CompA
            },
            data(){
                return {
                    
                }
            }
        }).mount("#app")
    </script>
</body>
</html>